<template>
  <div>
    <el-form ref="form" :model="form" label-position="left">
      <el-row>
        <el-col :span="24">
          <el-form-item label="原材选择" prop="workArea" label-width="120px">
            <el-checkbox-group v-model="form.type">
              <el-checkbox label="12" name="12"></el-checkbox>
              <el-checkbox label="9" name="9"></el-checkbox>
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="优化断料方案查看" prop="workArea" label-width="180px"></el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="用料设置:" prop="workArea" label-width="120px">
            <el-radio-group v-model="form.resource">
              <el-radio label="最优出材率"></el-radio>
              <el-radio label="保证余料出材率"></el-radio>
              <el-radio label="最佳余料使用量"></el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-button type="primary">重新计算</el-button>
        </el-col>
        <el-col :span="24" style="font-weight: 400;font-size: 16px;color: #5c5c5c;margin: 20px 0;">
          <div>出材率: 96%</div>
        </el-col>
        <el-col :span="24">
          <el-radio-group v-model="form.radio" size="medium">
            <el-radio-button label="φ6" ></el-radio-button>
            <el-radio-button label="φ8"></el-radio-button>
            <el-radio-button label="φ10"></el-radio-button>
            <el-radio-button label="φ12"></el-radio-button>
            <el-radio-button label="φ16"></el-radio-button>
          </el-radio-group>
        </el-col>
        <el-col :span="24" style="font-weight: 400;font-size: 16px;color: #5c5c5c;margin: 20px 0;">
          <div>9000 * 2根</div>
        </el-col>
        <el-col :span="24">
          <el-table v-loading="loading" ref="multipleTable" :data="tableData" tooltip-effect="dark">
            <el-table-column label="序号" width="55" align="center">
              <template slot-scope="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column prop="length" label="下料长度(mm)" align="center"></el-table-column>
            <el-table-column prop="quantity" label="数量" align="center"></el-table-column>
            <el-table-column prop="diagram" label="简图" align="center"></el-table-column>
          </el-table>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "",
  components: {},
  props: {},
  data() {
    return {
      form: {
        num: 0,
        type: []
      },

      loading: false,
      tableData: [
        {
          length: 9000,
          quantity: 2,
          diagram: '',
        },
      ],

      optimizeCuttingData: {},
    };
  },
  filters: {},
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  beforeDestroy() {},
  methods: {
    reset() {
      this.$nextTick(function () {
        this.$refs.form.resetFields();
      });
    },
    deliveryData() {
      this.optimizeCuttingData = {
        form: this.form,
        tableData: this.tableData
      };
      this.$emit("optimizeCuttingData", this.optimizeCuttingData);
    },
  },
};
</script>

<style scoped lang="scss"></style>
